#include <iostream>
#include <string>

// 代理模式
class RentHouse
{
public:
    virtual void rentHouse() = 0;
};

class LandLady:public RentHouse
{
public:
    void rentHouse()override
    {
        std::cout << "把房子租出去" << std::endl;
    }
};

class Intermediary:public RentHouse
{
public:
    void rentHouse()override
    {
        std::cout << "发布招租启⽰" << std::endl;
        std::cout << "带人看房" << std::endl;
        landlady.rentHouse();
        std::cout << "负责租后维修" << std::endl;
    }
private:
    LandLady landlady;
};

int main()
{
    Intermediary intermediary;
    intermediary.rentHouse();

    return 0;
}